<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Aestate: aestate/opera/DBPool/pooled_db.py Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aestate
   &#160;<span id="projectnumber">1.0.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_374ee6e3281d8312d956f1f155302869.html">aestate</a></li><li class="navelem"><a class="el" href="dir_3d2a62c9f0038653f55551d1ba6b2e78.html">opera</a></li><li class="navelem"><a class="el" href="dir_222c18a5940c41eb83d2a46ecf15e75c.html">DBPool</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">pooled_db.py</div>  </div>
</div><!--header-->
<div class="contents">
<a href="pooled__db_8py.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"><a class="line" href="namespaceaestate_1_1opera_1_1_d_b_pool_1_1pooled__db.html">    1</a></span>&#160;<span class="keyword">from</span> threading <span class="keyword">import</span> Condition</div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; </div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="keyword">from</span> . <span class="keyword">import</span> __version__</div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="keyword">from</span> .steady_db <span class="keyword">import</span> connect</div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; </div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_error.html">    7</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_error.html">PooledDBError</a>(Exception):</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;General PooledDB error.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_invalid_connection.html">   11</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_invalid_connection.html">InvalidConnection</a>(<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_error.html">PooledDBError</a>):</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;Database connection is invalid.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_not_supported_error.html">   15</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_not_supported_error.html">NotSupportedError</a>(<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_error.html">PooledDBError</a>):</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;DB-API module not supported by PooledDB.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_too_many_connections.html">   19</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_too_many_connections.html">TooManyConnections</a>(<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_error.html">PooledDBError</a>):</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;Too many database connections were opened.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html">   23</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html">PooledDB</a>:</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;Pool for DB-API 2 connections.</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="stringliteral">    After you have created the connection pool, you can use</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="stringliteral">    connection() to get pooled, steady DB-API 2 connections.</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="stringliteral">    &quot;&quot;&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a769527da0064a412426691048b43cc97">   30</a></span>&#160;    version = __version__</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ad89acbbd5b777a724403a3b7031f51db">   32</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ad89acbbd5b777a724403a3b7031f51db">__init__</a>(</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;            self, creator, mincached=0, maxcached=0,</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;            maxshared=0, maxconnections=0, blocking=False,</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            maxusage=None, setsession=None, reset=True,</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            failures=None, ping=1,</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;            *args, **kwargs):</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="stringliteral">        设置DB-API 2连接池。</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="stringliteral">        creator：返回新的DB-API 2的任意函数</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="stringliteral">            连接对象或符合DB-API 2的数据库模块</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="stringliteral">        mincached：池中空闲连接的初始数量</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="stringliteral">            （0表示启动时未建立连接）</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="stringliteral">        maxcached：池中最大空闲连接数</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="stringliteral">            （0或无表示池大小不受限制）</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="stringliteral">        maxshared：共享连接的最大数量</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="stringliteral">            （0或无表示所有连接都是专用的）</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="stringliteral">            当达到此最大数量时，连接为</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="stringliteral">            如果被要求共享，则将它们共享。</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="stringliteral">        maxconnections：通常允许的最大连接数</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="stringliteral">            （0或无表示任意数量的连接）</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="stringliteral">        blocking：确定超出最大值时的行为</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="stringliteral">            （如果将其设置为true，请阻止并等待，直到</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="stringliteral">            连接减少，否则将报告错误）</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="stringliteral">        maxusage：单个连接的最大重用次数</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="stringliteral">            （0或无表示无限重用）</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="stringliteral">            当达到连接的最大使用次数时，</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="stringliteral">            连接将自动重置（关闭并重新打开）。</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="stringliteral">        setsession：可用于准备的SQL命令的可选列表</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="stringliteral">            会话，例如[“将日期样式设置为...”，“将时区设置为...”]</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="stringliteral">        reset：返回到池后应如何重置连接</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="stringliteral">            （对于以begin（）开始的回滚事务，为False或None，</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="stringliteral">            出于安全考虑，总是发出回滚是正确的）</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="stringliteral">        failures：可选的异常类或异常类的元组</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="stringliteral">            为此，应应用连接故障转移机制，</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="stringliteral">            如果默认值（OperationalError，InternalError）不足够</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="stringliteral">        ping：确定何时应使用ping（）检查连接</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="stringliteral">            （0 =无=永不，1 =默认=每当从池中获取时，</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="stringliteral">            2 =创建游标时，4 =执行查询时，</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="stringliteral">            7 =始终，以及这些值的所有其他位组合）</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="stringliteral">        args，kwargs：应传递给创建者的参数</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="stringliteral">            函数或DB-API 2模块的连接构造函数</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="stringliteral">        初始化配置</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="stringliteral">        以下参数与PooledDB一致</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="stringliteral">        :param creator:默认即可</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="stringliteral">        :param maxconnections:默认即可</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="stringliteral">        :param mincached:默认即可</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="stringliteral">        :param maxcached:默认即可</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="stringliteral">        :param maxshared:默认即可</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="stringliteral">        :param blocking:默认即可</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="stringliteral">        :param setsession:默认即可</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="stringliteral">        :param ping:默认即可</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="stringliteral">        :param host:数据库IP地址</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="stringliteral">        :param port:端口</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="stringliteral">        :param user:用户名,如root</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="stringliteral">        :param password:密码</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="stringliteral">        :param database:数据库名</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="stringliteral">        :param charset:编码格式</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="stringliteral">        :param POOL:使用自定义的PooledDB,不建议</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="stringliteral">        &quot;&quot;&quot;</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            threadsafety = creator.threadsafety</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordflow">except</span> AttributeError:</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                <span class="keywordflow">if</span> <span class="keywordflow">not</span> callable(creator.connect):</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                    <span class="keywordflow">raise</span> AttributeError</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            <span class="keywordflow">except</span> AttributeError:</div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8c2ce012333497cd0f142fe0203d8fff">  102</a></span>&#160;                threadsafety = 2</div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0c38a1d9c58c0c4969b5661c3569875e">  103</a></span>&#160;            <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#aa9fb4cd4ee8224679009a828a3caceb1">  104</a></span>&#160;                threadsafety = 0</div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae47fed3fb0a35a5a905c0b30bc44b099">  105</a></span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> threadsafety:</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae23eeae036876ba96eec0f948eae0e38">  106</a></span>&#160;            <span class="keywordflow">raise</span> <a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_not_supported_error.html">NotSupportedError</a>(<span class="stringliteral">&quot;数据库模块未分配线程安全&quot;</span>)</div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a77570a246bd3eb54863078be1b292aba">  107</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8c2ce012333497cd0f142fe0203d8fff">_creator</a> = creator</div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a05d1c2d5f752a8a8cceacc87aa4e7028">  108</a></span>&#160;        self._args, self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0c38a1d9c58c0c4969b5661c3569875e">_kwargs</a> = args, kwargs</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a642b80cb82ccb3bf92bd407d17019bb8">  109</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#aa9fb4cd4ee8224679009a828a3caceb1">_blocking</a> = blocking</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae47fed3fb0a35a5a905c0b30bc44b099">_maxusage</a> = maxusage</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae23eeae036876ba96eec0f948eae0e38">_setsession</a> = setsession</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a77570a246bd3eb54863078be1b292aba">_reset</a> = reset</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a05d1c2d5f752a8a8cceacc87aa4e7028">_failures</a> = failures</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a642b80cb82ccb3bf92bd407d17019bb8">_ping</a> = ping</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">if</span> mincached <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            mincached = 0</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordflow">if</span> maxcached <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            maxcached = 0</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8a5bc28a2baa53b6ab5637076314f0d0">  119</a></span>&#160;        <span class="keywordflow">if</span> maxconnections <span class="keywordflow">is</span> <span class="keywordtype">None</span>:</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;            maxconnections = 0</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">if</span> maxcached:</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            <span class="keywordflow">if</span> maxcached &lt; mincached:</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a547de58a87dc65c1776cf49cc918bbba">  123</a></span>&#160;                maxcached = mincached</div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">  124</a></span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8a5bc28a2baa53b6ab5637076314f0d0">_maxcached</a> = maxcached</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8a5bc28a2baa53b6ab5637076314f0d0">_maxcached</a> = 0</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="keywordflow">if</span> threadsafety &gt; 1 <span class="keywordflow">and</span> maxshared:</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a547de58a87dc65c1776cf49cc918bbba">_maxshared</a> = maxshared</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a> = []  <span class="comment"># 共享连接的缓存</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a547de58a87dc65c1776cf49cc918bbba">_maxshared</a> = 0</div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">  132</a></span>&#160;        <span class="keywordflow">if</span> maxconnections:</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordflow">if</span> maxconnections &lt; maxcached:</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                maxconnections = maxcached</div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">  135</a></span>&#160;            <span class="keywordflow">if</span> maxconnections &lt; maxshared:</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">  136</a></span>&#160;                maxconnections = maxshared</div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">  137</a></span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">_maxconnections</a> = maxconnections</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">_maxconnections</a> = 0</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">_idle_cache</a> = []  <span class="comment"># 空闲连接池</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a> = Condition()</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">_connections</a> = 0</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="comment"># Establish an initial number of idle database connections:</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        idle = [self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ad8c85047cc77946bad58a4b0d3f7c5cc">dedicated_connection</a>() <span class="keywordflow">for</span> i <span class="keywordflow">in</span> range(mincached)]</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <span class="keywordflow">while</span> idle:</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;            idle.pop().<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a80dfa04438c2060ee8867c135f401538">close</a>()</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a06ee055becc8b958e365378d4803f3f4">  148</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a06ee055becc8b958e365378d4803f3f4">steady_connection</a>(self):</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;获得稳定的，未池化的DB-API 2连接.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="namespaceaestate_1_1opera_1_1_d_b_pool_1_1steady__db.html#ac744dc4ab3e2dabdd34d3441e7d9ab5c">connect</a>(</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8c2ce012333497cd0f142fe0203d8fff">_creator</a>, self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae47fed3fb0a35a5a905c0b30bc44b099">_maxusage</a>, self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae23eeae036876ba96eec0f948eae0e38">_setsession</a>,</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a05d1c2d5f752a8a8cceacc87aa4e7028">_failures</a>, self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a642b80cb82ccb3bf92bd407d17019bb8">_ping</a>, <span class="keyword">True</span>, *self._args, **self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0c38a1d9c58c0c4969b5661c3569875e">_kwargs</a>)</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a959ae7955f2dfae66ad44fd96e7b0717">  154</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a959ae7955f2dfae66ad44fd96e7b0717">connection</a>(self, shareable=True):</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;从连接池中获得稳定的缓存的DB-API 2连接。</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="stringliteral">         :param shareable:允许共享连接</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="stringliteral">        &quot;&quot;&quot;</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordflow">if</span> shareable <span class="keywordflow">and</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a547de58a87dc65c1776cf49cc918bbba">_maxshared</a>:</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.acquire()</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;            <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                <span class="keywordflow">while</span> (<span class="keywordflow">not</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a> <span class="keywordflow">and</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">_maxconnections</a></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                       <span class="keywordflow">and</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">_connections</a> &gt;= self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">_maxconnections</a>):</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                    self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3acc9fd292d23e1492808430de58bbab">_wait_lock</a>()</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                <span class="keywordflow">if</span> len(self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>) &lt; self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a547de58a87dc65c1776cf49cc918bbba">_maxshared</a>:</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                    <span class="comment"># shared cache is not full, get a dedicated connection</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;                    <span class="keywordflow">try</span>:  <span class="comment"># first try to get it from the idle cache</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                        con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">_idle_cache</a>.pop(0)</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                    <span class="keywordflow">except</span> IndexError:  <span class="comment"># else get a fresh connection</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                        con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a06ee055becc8b958e365378d4803f3f4">steady_connection</a>()</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;                    <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                        con._ping_check()  <span class="comment"># check this connection</span></div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                    con = <a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html">SharedDBConnection</a>(con)</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;                    self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">_connections</a> += 1</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;                <span class="keywordflow">else</span>:  <span class="comment"># shared cache full or no more connections allowed</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;                    self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.sort()  <span class="comment"># least shared connection first</span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                    con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.pop(0)  <span class="comment"># get it</span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                    <span class="keywordflow">while</span> con.con._transaction:</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                        <span class="comment"># do not share connections which are in a transaction</span></div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.insert(0, con)</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3acc9fd292d23e1492808430de58bbab">_wait_lock</a>()</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.sort()</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                        con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.pop(0)</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                    con.con._ping_check()  <span class="comment"># check the underlying connection</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                    con.share()  <span class="comment"># increase share of this connection</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                <span class="comment"># put the connection (back) into the shared cache</span></div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.append(con)</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.notify()</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            <span class="keywordflow">finally</span>:</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.release()</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;            con = <a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html">PooledSharedDBConnection</a>(self, con)</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <span class="keywordflow">else</span>:  <span class="comment"># try to get a dedicated connection</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.acquire()</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;            <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;                <span class="keywordflow">while</span> (self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">_maxconnections</a></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;                       <span class="keywordflow">and</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">_connections</a> &gt;= self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">_maxconnections</a>):</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;                    self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3acc9fd292d23e1492808430de58bbab">_wait_lock</a>()</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;                <span class="comment"># connection limit not reached, get a dedicated connection</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;                <span class="keywordflow">try</span>:  <span class="comment"># first try to get it from the idle cache</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;                    con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">_idle_cache</a>.pop(0)</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;                <span class="keywordflow">except</span> IndexError:  <span class="comment"># else get a fresh connection</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;                    con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a06ee055becc8b958e365378d4803f3f4">steady_connection</a>()</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;                <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                    con._ping_check()  <span class="comment"># check connection</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                con = <a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html">PooledDedicatedDBConnection</a>(self, con)</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;                self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">_connections</a> += 1</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            <span class="keywordflow">finally</span>:</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;                self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.release()</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <span class="keywordflow">return</span> con</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ad8c85047cc77946bad58a4b0d3f7c5cc">  211</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ad8c85047cc77946bad58a4b0d3f7c5cc">dedicated_connection</a>(self):</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Alias for connection(shareable=False).&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keywordflow">return</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a959ae7955f2dfae66ad44fd96e7b0717">connection</a>(<span class="keyword">False</span>)</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160; </div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a1af8b808abcac5469d52a0ef2ae33a25">  215</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a1af8b808abcac5469d52a0ef2ae33a25">unshare</a>(self, con):</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Decrease the share of a connection in the shared cache.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.acquire()</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            con.unshare()</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            shared = con.shared</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> shared:  <span class="comment"># connection is idle,</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                <span class="keywordflow">try</span>:  <span class="comment"># so try to remove it</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                    self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.remove(con)  <span class="comment"># from shared cache</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                <span class="keywordflow">except</span> ValueError:</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;                    <span class="keywordflow">pass</span>  <span class="comment"># pool has already been closed</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        <span class="keywordflow">finally</span>:</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.release()</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> shared:  <span class="comment"># connection has become idle,</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a7cf476e69eea8cc1a730098f96503dbd">cache</a>(con.con)  <span class="comment"># so add it to the idle cache</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a7cf476e69eea8cc1a730098f96503dbd">  231</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a7cf476e69eea8cc1a730098f96503dbd">cache</a>(self, con):</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Put a dedicated connection back into the idle cache.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.acquire()</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            <span class="keywordflow">if</span> <span class="keywordflow">not</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8a5bc28a2baa53b6ab5637076314f0d0">_maxcached</a> <span class="keywordflow">or</span> len(self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">_idle_cache</a>) &lt; self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8a5bc28a2baa53b6ab5637076314f0d0">_maxcached</a>:</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                con._reset(force=self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a77570a246bd3eb54863078be1b292aba">_reset</a>)  <span class="comment"># rollback possible transaction</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;                <span class="comment"># the idle cache is not full, so put it there</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">_idle_cache</a>.append(con)  <span class="comment"># append it to the idle cache</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;            <span class="keywordflow">else</span>:  <span class="comment"># if the idle cache is already full,</span></div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                con.close()  <span class="comment"># then close the connection</span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">_connections</a> -= 1</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.notify()</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        <span class="keywordflow">finally</span>:</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.release()</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160; </div>
<div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a80dfa04438c2060ee8867c135f401538">  246</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a80dfa04438c2060ee8867c135f401538">close</a>(self):</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Close all connections in the pool.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.acquire()</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            <span class="keywordflow">while</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">_idle_cache</a>:  <span class="comment"># close all idle connections</span></div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">_idle_cache</a>.pop(0)</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                    con.close()</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;                <span class="keywordflow">except</span> Exception:</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                    <span class="keywordflow">pass</span></div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            <span class="keywordflow">if</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a547de58a87dc65c1776cf49cc918bbba">_maxshared</a>:  <span class="comment"># close all shared connections</span></div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                <span class="keywordflow">while</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>:</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                    con = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">_shared_cache</a>.pop(0).con</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                    <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                        con.close()</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;                    <span class="keywordflow">except</span> Exception:</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;                        <span class="keywordflow">pass</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;                    self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">_connections</a> -= 1</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.notifyAll()</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="keywordflow">finally</span>:</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.release()</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3b1324d0741db4447e876ab702dcbffd">  268</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3b1324d0741db4447e876ab702dcbffd">__del__</a>(self):</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Delete the pool.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a80dfa04438c2060ee8867c135f401538">close</a>()</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="keywordflow">except</span>:  <span class="comment"># builtin Exceptions might not exist any more</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;            <span class="keywordflow">pass</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3acc9fd292d23e1492808430de58bbab">  275</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3acc9fd292d23e1492808430de58bbab">_wait_lock</a>(self):</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Wait until notified or report an error.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#aa9fb4cd4ee8224679009a828a3caceb1">_blocking</a>:</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;            <span class="keywordflow">raise</span> TooManyConnections</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">_lock</a>.wait()</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;<span class="comment"># Auxiliary classes for pooled connections</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160; </div>
<div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html">  284</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html">PooledDedicatedDBConnection</a>:</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;Auxiliary proxy class for pooled dedicated connections.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a048ebc1e9c0f6f3a56a2cf814805cffe">  287</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a048ebc1e9c0f6f3a56a2cf814805cffe">__init__</a>(self, pool, con):</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Create a pooled dedicated connection.</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;<span class="stringliteral">        pool: the corresponding PooledDB instance</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="stringliteral">        con: the underlying SteadyDB connection</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;<span class="stringliteral">        &quot;&quot;&quot;</span></div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <span class="comment"># basic initialization to make finalizer work</span></div>
<div class="line"><a name="l00294"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">  294</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">_con</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;        <span class="comment"># proper initialization of the connection</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> con.threadsafety():</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;            <span class="keywordflow">raise</span> <a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_not_supported_error.html">NotSupportedError</a>(<span class="stringliteral">&quot;数据库模块未分配线程安全&quot;</span>)</div>
<div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a1528d935d4600bb72c16b6bcd2ab08d3">  298</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a1528d935d4600bb72c16b6bcd2ab08d3">_pool</a> = pool</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">_con</a> = con</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160; </div>
<div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#ac7762906f18ffcf3b292ee07a8db7787">  301</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#ac7762906f18ffcf3b292ee07a8db7787">close</a>(self):</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Close the pooled dedicated connection.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        <span class="comment"># Instead of actually closing the connection,</span></div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        <span class="comment"># return it to the pool for future reuse.</span></div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">_con</a>:</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a1528d935d4600bb72c16b6bcd2ab08d3">_pool</a>.cache(self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">_con</a>)</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">_con</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160; </div>
<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a94e32f204f2532b282e61bb64f77084a">  309</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a94e32f204f2532b282e61bb64f77084a">__getattr__</a>(self, name):</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Proxy all members of the class.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">_con</a>:</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;            <span class="keywordflow">return</span> getattr(self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">_con</a>, name)</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;            <span class="keywordflow">raise</span> InvalidConnection</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a52d14f44a8b3fb29fd30dd632bc05152">  316</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a52d14f44a8b3fb29fd30dd632bc05152">__del__</a>(self):</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Delete the pooled connection.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#ac7762906f18ffcf3b292ee07a8db7787">close</a>()</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        <span class="keywordflow">except</span>:  <span class="comment"># builtin Exceptions might not exist any more</span></div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;            <span class="keywordflow">pass</span></div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160; </div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160; </div>
<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html">  324</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html">SharedDBConnection</a>:</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;Auxiliary class for shared connections.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160; </div>
<div class="line"><a name="l00327"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a822ed5875b3588c7edb694986af6ce12">  327</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a822ed5875b3588c7edb694986af6ce12">__init__</a>(self, con):</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Create a shared connection.</span></div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;<span class="stringliteral">        con: the underlying SteadyDB connection</span></div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="stringliteral">        &quot;&quot;&quot;</span></div>
<div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">  332</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">con</a> = con</div>
<div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">  333</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">shared</a> = 1</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160; </div>
<div class="line"><a name="l00335"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a91fcb6c7ee7ed2ad4b874fd8af67175b">  335</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a91fcb6c7ee7ed2ad4b874fd8af67175b">__lt__</a>(self, other):</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">con</a>._transaction == other.con._transaction:</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;            <span class="keywordflow">return</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">shared</a> &lt; other.shared</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;            <span class="keywordflow">return</span> <span class="keywordflow">not</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">con</a>._transaction</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160; </div>
<div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#abb7e7741c0aebeb2752f5fba745a6dc2">  341</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#abb7e7741c0aebeb2752f5fba745a6dc2">__le__</a>(self, other):</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">con</a>._transaction == other.con._transaction:</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;            <span class="keywordflow">return</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">shared</a> &lt;= other.shared</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;            <span class="keywordflow">return</span> <span class="keywordflow">not</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">con</a>._transaction</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#afcfb0a0c50ad0b55623b0ac739369602">  347</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#afcfb0a0c50ad0b55623b0ac739369602">__eq__</a>(self, other):</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        <span class="keywordflow">return</span> (self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">con</a>._transaction == other.con._transaction</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;                <span class="keywordflow">and</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">shared</a> == other.shared)</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160; </div>
<div class="line"><a name="l00351"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#af4cd105d448202ff0f61171afc68a5bd">  351</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#af4cd105d448202ff0f61171afc68a5bd">__ne__</a>(self, other):</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;        <span class="keywordflow">return</span> <span class="keywordflow">not</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#afcfb0a0c50ad0b55623b0ac739369602">__eq__</a>(other)</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160; </div>
<div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a6de405058182aa2d51e9ce49e20dbb52">  354</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a6de405058182aa2d51e9ce49e20dbb52">__gt__</a>(self, other):</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <span class="keywordflow">return</span> other.__lt__(self)</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160; </div>
<div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#ab368316b125ef3e982c8914f7ed87094">  357</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#ab368316b125ef3e982c8914f7ed87094">__ge__</a>(self, other):</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        <span class="keywordflow">return</span> other.__le__(self)</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160; </div>
<div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a0ffe2b0de58f7aa08e9ef1ddfc393b87">  360</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a0ffe2b0de58f7aa08e9ef1ddfc393b87">share</a>(self):</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Increase the share of this connection.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">shared</a> += 1</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160; </div>
<div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aa9af88a5a4852c2c9edcc6359da52c67">  364</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aa9af88a5a4852c2c9edcc6359da52c67">unshare</a>(self):</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Decrease the share of this connection.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">shared</a> -= 1</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160; </div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160; </div>
<div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html">  369</a></span>&#160;<span class="keyword">class </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html">PooledSharedDBConnection</a>:</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    <span class="stringliteral">&quot;&quot;&quot;Auxiliary proxy class for pooled shared connections.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160; </div>
<div class="line"><a name="l00372"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a784ca79196127beef1758ab2a14a1071">  372</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a784ca79196127beef1758ab2a14a1071">__init__</a>(self, pool, shared_con):</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Create a pooled shared connection.</span></div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;<span class="stringliteral"></span> </div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;<span class="stringliteral">        pool: the corresponding PooledDB instance</span></div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;<span class="stringliteral">        con: the underlying SharedDBConnection</span></div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;<span class="stringliteral">        &quot;&quot;&quot;</span></div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        <span class="comment"># basic initialization to make finalizer work</span></div>
<div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">  379</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">_con</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        <span class="comment"># proper initialization of the connection</span></div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;        con = shared_con.con</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        <span class="keywordflow">if</span> <span class="keywordflow">not</span> con.threadsafety() &gt; 1:</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;            <span class="keywordflow">raise</span> <a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_not_supported_error.html">NotSupportedError</a>(<span class="stringliteral">&quot;数据库模块未分配线程安全&quot;</span>)</div>
<div class="line"><a name="l00384"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#aa462315b4c0e4043b700f6c957e5737d">  384</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#aa462315b4c0e4043b700f6c957e5737d">_pool</a> = pool</div>
<div class="line"><a name="l00385"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a5bf539ec2f3a3cab8af89ea1d23c62f6">  385</a></span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a5bf539ec2f3a3cab8af89ea1d23c62f6">_shared_con</a> = shared_con</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">_con</a> = con</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160; </div>
<div class="line"><a name="l00388"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a2cee4018c0a7e1604d4e4405b0818110">  388</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a2cee4018c0a7e1604d4e4405b0818110">close</a>(self):</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Close the pooled shared connection.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        <span class="comment"># Instead of actually closing the connection,</span></div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;        <span class="comment"># unshare it and/or return it to the pool.</span></div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">_con</a>:</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#aa462315b4c0e4043b700f6c957e5737d">_pool</a>.unshare(self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a5bf539ec2f3a3cab8af89ea1d23c62f6">_shared_con</a>)</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a5bf539ec2f3a3cab8af89ea1d23c62f6">_shared_con</a> = self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">_con</a> = <span class="keywordtype">None</span></div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160; </div>
<div class="line"><a name="l00396"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a20ae77d8c31d6ecc65f86ecbe109e3a2">  396</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a20ae77d8c31d6ecc65f86ecbe109e3a2">__getattr__</a>(self, name):</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Proxy all members of the class.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        <span class="keywordflow">if</span> self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">_con</a>:</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;            <span class="keywordflow">return</span> getattr(self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">_con</a>, name)</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        <span class="keywordflow">else</span>:</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;            <span class="keywordflow">raise</span> InvalidConnection</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160; </div>
<div class="line"><a name="l00403"></a><span class="lineno"><a class="line" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#aef2282c058c34d84ae01c0042b97d47f">  403</a></span>&#160;    <span class="keyword">def </span><a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#aef2282c058c34d84ae01c0042b97d47f">__del__</a>(self):</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        <span class="stringliteral">&quot;&quot;&quot;Delete the pooled connection.&quot;&quot;&quot;</span></div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        <span class="keywordflow">try</span>:</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;            self.<a class="code" href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a2cee4018c0a7e1604d4e4405b0818110">close</a>()</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        <span class="keywordflow">except</span>:  <span class="comment"># builtin Exceptions might not exist any more</span></div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;            <span class="keywordflow">pass</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_a91fcb6c7ee7ed2ad4b874fd8af67175b"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a91fcb6c7ee7ed2ad4b874fd8af67175b">aestate.opera.DBPool.pooled_db.SharedDBConnection.__lt__</a></div><div class="ttdeci">def __lt__(self, other)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00335">pooled_db.py:335</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_ad8c85047cc77946bad58a4b0d3f7c5cc"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ad8c85047cc77946bad58a4b0d3f7c5cc">aestate.opera.DBPool.pooled_db.PooledDB.dedicated_connection</a></div><div class="ttdeci">def dedicated_connection(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00211">pooled_db.py:211</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection_html_a52d14f44a8b3fb29fd30dd632bc05152"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a52d14f44a8b3fb29fd30dd632bc05152">aestate.opera.DBPool.pooled_db.PooledDedicatedDBConnection.__del__</a></div><div class="ttdeci">def __del__(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00316">pooled_db.py:316</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a3b1324d0741db4447e876ab702dcbffd"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3b1324d0741db4447e876ab702dcbffd">aestate.opera.DBPool.pooled_db.PooledDB.__del__</a></div><div class="ttdeci">def __del__(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00268">pooled_db.py:268</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection_html_a048ebc1e9c0f6f3a56a2cf814805cffe"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a048ebc1e9c0f6f3a56a2cf814805cffe">aestate.opera.DBPool.pooled_db.PooledDedicatedDBConnection.__init__</a></div><div class="ttdeci">def __init__(self, pool, con)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00287">pooled_db.py:287</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a0c38a1d9c58c0c4969b5661c3569875e"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0c38a1d9c58c0c4969b5661c3569875e">aestate.opera.DBPool.pooled_db.PooledDB._kwargs</a></div><div class="ttdeci">_kwargs</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00103">pooled_db.py:103</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html_a20ae77d8c31d6ecc65f86ecbe109e3a2"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a20ae77d8c31d6ecc65f86ecbe109e3a2">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection.__getattr__</a></div><div class="ttdeci">def __getattr__(self, name)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00396">pooled_db.py:396</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html_a90c853f18dc83f85178e0dcb35b56318"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a90c853f18dc83f85178e0dcb35b56318">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection._con</a></div><div class="ttdeci">_con</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00379">pooled_db.py:379</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html_aa462315b4c0e4043b700f6c957e5737d"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#aa462315b4c0e4043b700f6c957e5737d">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection._pool</a></div><div class="ttdeci">_pool</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00384">pooled_db.py:384</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection_html_a8741d83be97d6566e803deac047c166a"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a8741d83be97d6566e803deac047c166a">aestate.opera.DBPool.pooled_db.PooledDedicatedDBConnection._con</a></div><div class="ttdeci">_con</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00294">pooled_db.py:294</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection_html_ac7762906f18ffcf3b292ee07a8db7787"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#ac7762906f18ffcf3b292ee07a8db7787">aestate.opera.DBPool.pooled_db.PooledDedicatedDBConnection.close</a></div><div class="ttdeci">def close(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00301">pooled_db.py:301</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_invalid_connection_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_invalid_connection.html">aestate.opera.DBPool.pooled_db.InvalidConnection</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00011">pooled_db.py:11</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection_html_a94e32f204f2532b282e61bb64f77084a"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a94e32f204f2532b282e61bb64f77084a">aestate.opera.DBPool.pooled_db.PooledDedicatedDBConnection.__getattr__</a></div><div class="ttdeci">def __getattr__(self, name)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00309">pooled_db.py:309</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a9c9be369217e8caa4f77991e8a3b78a5"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9c9be369217e8caa4f77991e8a3b78a5">aestate.opera.DBPool.pooled_db.PooledDB._idle_cache</a></div><div class="ttdeci">_idle_cache</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00135">pooled_db.py:135</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a0a4c07b3eedad2f2ddc2bcc8a0ad3ff6">aestate.opera.DBPool.pooled_db.PooledDB._maxconnections</a></div><div class="ttdeci">_maxconnections</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00132">pooled_db.py:132</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_a1778097bd360f26a88ed96febc346081"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a1778097bd360f26a88ed96febc346081">aestate.opera.DBPool.pooled_db.SharedDBConnection.shared</a></div><div class="ttdeci">shared</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00333">pooled_db.py:333</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a959ae7955f2dfae66ad44fd96e7b0717"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a959ae7955f2dfae66ad44fd96e7b0717">aestate.opera.DBPool.pooled_db.PooledDB.connection</a></div><div class="ttdeci">def connection(self, shareable=True)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00154">pooled_db.py:154</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html">aestate.opera.DBPool.pooled_db.PooledDedicatedDBConnection</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00284">pooled_db.py:284</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_a822ed5875b3588c7edb694986af6ce12"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a822ed5875b3588c7edb694986af6ce12">aestate.opera.DBPool.pooled_db.SharedDBConnection.__init__</a></div><div class="ttdeci">def __init__(self, con)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00327">pooled_db.py:327</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a8a5bc28a2baa53b6ab5637076314f0d0"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8a5bc28a2baa53b6ab5637076314f0d0">aestate.opera.DBPool.pooled_db.PooledDB._maxcached</a></div><div class="ttdeci">_maxcached</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00119">pooled_db.py:119</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a05d1c2d5f752a8a8cceacc87aa4e7028"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a05d1c2d5f752a8a8cceacc87aa4e7028">aestate.opera.DBPool.pooled_db.PooledDB._failures</a></div><div class="ttdeci">_failures</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00108">pooled_db.py:108</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_ad89acbbd5b777a724403a3b7031f51db"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ad89acbbd5b777a724403a3b7031f51db">aestate.opera.DBPool.pooled_db.PooledDB.__init__</a></div><div class="ttdeci">def __init__(self, creator, mincached=0, maxcached=0, maxshared=0, maxconnections=0, blocking=False, maxusage=None, setsession=None, reset=True, failures=None, ping=1, *args, **kwargs)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00032">pooled_db.py:32</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_afcfb0a0c50ad0b55623b0ac739369602"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#afcfb0a0c50ad0b55623b0ac739369602">aestate.opera.DBPool.pooled_db.SharedDBConnection.__eq__</a></div><div class="ttdeci">def __eq__(self, other)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00347">pooled_db.py:347</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection_html_a1528d935d4600bb72c16b6bcd2ab08d3"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_dedicated_d_b_connection.html#a1528d935d4600bb72c16b6bcd2ab08d3">aestate.opera.DBPool.pooled_db.PooledDedicatedDBConnection._pool</a></div><div class="ttdeci">_pool</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00298">pooled_db.py:298</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html">aestate.opera.DBPool.pooled_db.SharedDBConnection</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00324">pooled_db.py:324</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a9a3a5461803f31ec73863fbd01a47008"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a9a3a5461803f31ec73863fbd01a47008">aestate.opera.DBPool.pooled_db.PooledDB._shared_cache</a></div><div class="ttdeci">_shared_cache</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00124">pooled_db.py:124</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a7cf476e69eea8cc1a730098f96503dbd"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a7cf476e69eea8cc1a730098f96503dbd">aestate.opera.DBPool.pooled_db.PooledDB.cache</a></div><div class="ttdeci">def cache(self, con)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00231">pooled_db.py:231</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html_a784ca79196127beef1758ab2a14a1071"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a784ca79196127beef1758ab2a14a1071">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection.__init__</a></div><div class="ttdeci">def __init__(self, pool, shared_con)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00372">pooled_db.py:372</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_too_many_connections_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_too_many_connections.html">aestate.opera.DBPool.pooled_db.TooManyConnections</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00019">pooled_db.py:19</a></div></div>
<div class="ttc" id="anamespaceaestate_1_1opera_1_1_d_b_pool_1_1steady__db_html_ac744dc4ab3e2dabdd34d3441e7d9ab5c"><div class="ttname"><a href="namespaceaestate_1_1opera_1_1_d_b_pool_1_1steady__db.html#ac744dc4ab3e2dabdd34d3441e7d9ab5c">aestate.opera.DBPool.steady_db.connect</a></div><div class="ttdeci">def connect(creator, maxusage=None, setsession=None, failures=None, ping=1, closeable=True, *args, **kwargs)</div><div class="ttdef"><b>Definition:</b> <a href="steady__db_8py_source.html#l00017">steady_db.py:17</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html_aef2282c058c34d84ae01c0042b97d47f"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#aef2282c058c34d84ae01c0042b97d47f">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection.__del__</a></div><div class="ttdeci">def __del__(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00403">pooled_db.py:403</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_ab368316b125ef3e982c8914f7ed87094"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#ab368316b125ef3e982c8914f7ed87094">aestate.opera.DBPool.pooled_db.SharedDBConnection.__ge__</a></div><div class="ttdeci">def __ge__(self, other)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00357">pooled_db.py:357</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_abb7e7741c0aebeb2752f5fba745a6dc2"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#abb7e7741c0aebeb2752f5fba745a6dc2">aestate.opera.DBPool.pooled_db.SharedDBConnection.__le__</a></div><div class="ttdeci">def __le__(self, other)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00341">pooled_db.py:341</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_aa9af88a5a4852c2c9edcc6359da52c67"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aa9af88a5a4852c2c9edcc6359da52c67">aestate.opera.DBPool.pooled_db.SharedDBConnection.unshare</a></div><div class="ttdeci">def unshare(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00364">pooled_db.py:364</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_error_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_error.html">aestate.opera.DBPool.pooled_db.PooledDBError</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00007">pooled_db.py:7</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_aac70adb1261b7c34b23912d4b31a444c"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#aac70adb1261b7c34b23912d4b31a444c">aestate.opera.DBPool.pooled_db.SharedDBConnection.con</a></div><div class="ttdeci">con</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00332">pooled_db.py:332</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_afb864499f4ea3bbbfa13365b2845af07"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#afb864499f4ea3bbbfa13365b2845af07">aestate.opera.DBPool.pooled_db.PooledDB._connections</a></div><div class="ttdeci">_connections</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00137">pooled_db.py:137</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a06ee055becc8b958e365378d4803f3f4"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a06ee055becc8b958e365378d4803f3f4">aestate.opera.DBPool.pooled_db.PooledDB.steady_connection</a></div><div class="ttdeci">def steady_connection(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00148">pooled_db.py:148</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a3acc9fd292d23e1492808430de58bbab"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a3acc9fd292d23e1492808430de58bbab">aestate.opera.DBPool.pooled_db.PooledDB._wait_lock</a></div><div class="ttdeci">def _wait_lock(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00275">pooled_db.py:275</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a8c2ce012333497cd0f142fe0203d8fff"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a8c2ce012333497cd0f142fe0203d8fff">aestate.opera.DBPool.pooled_db.PooledDB._creator</a></div><div class="ttdeci">_creator</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00102">pooled_db.py:102</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_af4cd105d448202ff0f61171afc68a5bd"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#af4cd105d448202ff0f61171afc68a5bd">aestate.opera.DBPool.pooled_db.SharedDBConnection.__ne__</a></div><div class="ttdeci">def __ne__(self, other)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00351">pooled_db.py:351</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html_a2cee4018c0a7e1604d4e4405b0818110"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a2cee4018c0a7e1604d4e4405b0818110">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection.close</a></div><div class="ttdeci">def close(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00388">pooled_db.py:388</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00369">pooled_db.py:369</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a642b80cb82ccb3bf92bd407d17019bb8"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a642b80cb82ccb3bf92bd407d17019bb8">aestate.opera.DBPool.pooled_db.PooledDB._ping</a></div><div class="ttdeci">_ping</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00109">pooled_db.py:109</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_a0ffe2b0de58f7aa08e9ef1ddfc393b87"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a0ffe2b0de58f7aa08e9ef1ddfc393b87">aestate.opera.DBPool.pooled_db.SharedDBConnection.share</a></div><div class="ttdeci">def share(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00360">pooled_db.py:360</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html">aestate.opera.DBPool.pooled_db.PooledDB</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00023">pooled_db.py:23</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a77570a246bd3eb54863078be1b292aba"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a77570a246bd3eb54863078be1b292aba">aestate.opera.DBPool.pooled_db.PooledDB._reset</a></div><div class="ttdeci">_reset</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00107">pooled_db.py:107</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a80dfa04438c2060ee8867c135f401538"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a80dfa04438c2060ee8867c135f401538">aestate.opera.DBPool.pooled_db.PooledDB.close</a></div><div class="ttdeci">def close(self)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00246">pooled_db.py:246</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_not_supported_error_html"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_not_supported_error.html">aestate.opera.DBPool.pooled_db.NotSupportedError</a></div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00015">pooled_db.py:15</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection_html_a5bf539ec2f3a3cab8af89ea1d23c62f6"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_shared_d_b_connection.html#a5bf539ec2f3a3cab8af89ea1d23c62f6">aestate.opera.DBPool.pooled_db.PooledSharedDBConnection._shared_con</a></div><div class="ttdeci">_shared_con</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00385">pooled_db.py:385</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a1af8b808abcac5469d52a0ef2ae33a25"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a1af8b808abcac5469d52a0ef2ae33a25">aestate.opera.DBPool.pooled_db.PooledDB.unshare</a></div><div class="ttdeci">def unshare(self, con)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00215">pooled_db.py:215</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_ac192157bd0f27d69b92425c98d4f0b72"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ac192157bd0f27d69b92425c98d4f0b72">aestate.opera.DBPool.pooled_db.PooledDB._lock</a></div><div class="ttdeci">_lock</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00136">pooled_db.py:136</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_a547de58a87dc65c1776cf49cc918bbba"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#a547de58a87dc65c1776cf49cc918bbba">aestate.opera.DBPool.pooled_db.PooledDB._maxshared</a></div><div class="ttdeci">_maxshared</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00123">pooled_db.py:123</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection_html_a6de405058182aa2d51e9ce49e20dbb52"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_shared_d_b_connection.html#a6de405058182aa2d51e9ce49e20dbb52">aestate.opera.DBPool.pooled_db.SharedDBConnection.__gt__</a></div><div class="ttdeci">def __gt__(self, other)</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00354">pooled_db.py:354</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_ae47fed3fb0a35a5a905c0b30bc44b099"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae47fed3fb0a35a5a905c0b30bc44b099">aestate.opera.DBPool.pooled_db.PooledDB._maxusage</a></div><div class="ttdeci">_maxusage</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00105">pooled_db.py:105</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_ae23eeae036876ba96eec0f948eae0e38"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#ae23eeae036876ba96eec0f948eae0e38">aestate.opera.DBPool.pooled_db.PooledDB._setsession</a></div><div class="ttdeci">_setsession</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00106">pooled_db.py:106</a></div></div>
<div class="ttc" id="aclassaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b_html_aa9fb4cd4ee8224679009a828a3caceb1"><div class="ttname"><a href="classaestate_1_1opera_1_1_d_b_pool_1_1pooled__db_1_1_pooled_d_b.html#aa9fb4cd4ee8224679009a828a3caceb1">aestate.opera.DBPool.pooled_db.PooledDB._blocking</a></div><div class="ttdeci">_blocking</div><div class="ttdef"><b>Definition:</b> <a href="pooled__db_8py_source.html#l00104">pooled_db.py:104</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
